<div id="topic_edit_div" class="app-toolbar-content">
    <?php
    $tittleText = '专题编辑';
    require("{$CfgPara->root}/view/tittle_back_bar.app.v.php");
    ?>
    <div style="padding:10px 15px 10px 15px">
        <form action="<?= $CfgPara->httproot ?>/index.php"
              id="upload_img_form" class="am-form" enctype="multipart/form-data" method="post">
            <div class="am-form-group am-form-file">
                <i class="am-icon-cloud-upload app-main-color"></i>选择要上传的图片
                <input id="img_upload" name="img_upload" type="file">
            </div>
            <input style="display:none" name="controller" type="text" value="topic_edit"/>
            <input style="display:none" name="topic_id" type="text"
                   value="<?php if (isset($topicMsg)) echo $topicMsg->Id; else echo '0'; ?>"/>
            <input style="display:none" name="topic_name" type="text" value=""/>
            <input style="display:none" name="introd" type="text" value=""/>
            <input style="display:none" name="topic_state" type="text" value="0"/>
        </form>
        <div id="img_demo">
            <?php
            if (isset($topicMsg->Picture) && $topicMsg->Picture != '') {
                $picMini = make_img_name::make_img_mini_name($topicMsg->Picture);
                echo "<img class='app-img-preview' src='{$CfgPara->httproot}/topic_pic/{$picMini}' />";
            }
            ?>
        </div>
    </div>
    <div class="am-form">
        <div class="am-form-group" style="margin-bottom:0px">
            <input
                    id="topic_edit_tittle"
                    type="text"
                    class="am-form-field"
                    placeholder="请输入专题标题"
                    value="<?php if (isset($topicMsg)) echo $topicMsg->Name ?>"/>
        </div>
        <div style="height: 10px;"></div>
        <div class="am-form-group">
            <textarea rows="4" id="topic_edit_content_introd"
                      placeholder="请输入专题介绍"><?php if (isset($topicMsg)) echo $topicMsg->Introd; ?></textarea>
        </div>
    </div>
</div>
<div id="topic_edit_toolbar" class="am-btn-group" style="width:100%">
    <a class="am-btn am-btn-default" style="width:50%" role="button" onclick="topic_save(0)">存为草稿</a>
    <a class="am-btn am-btn-primary" style="width:50%" role="button" onclick="topic_save(1)">发布</a>
</div>
<script type="text/javascript">
    img_upload_ini("img_upload");
    toolbar_ini("topic_edit_div", "topic_edit_toolbar");
</script>